package com.ruoyi.web.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.web.mapper.GuMrStockDailyMapper;
import com.ruoyi.web.domain.GuMrStockDaily;
import com.ruoyi.web.service.IGuMrStockDailyService;

/**
 * 股票日K线数据Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-24
 */
@Service
public class GuMrStockDailyServiceImpl implements IGuMrStockDailyService 
{
    @Autowired
    private GuMrStockDailyMapper guMrStockDailyMapper;

    /**
     * 查询股票日K线数据
     * 
     * @param id 股票日K线数据主键
     * @return 股票日K线数据
     */
    @Override
    public GuMrStockDaily selectGuMrStockDailyById(String id)
    {
        return guMrStockDailyMapper.selectGuMrStockDailyById(id);
    }

    /**
     * 查询股票日K线数据列表
     * 
     * @param guMrStockDaily 股票日K线数据
     * @return 股票日K线数据
     */
    @Override
    public List<GuMrStockDaily> selectGuMrStockDailyList(GuMrStockDaily guMrStockDaily)
    {
        return guMrStockDailyMapper.selectGuMrStockDailyList(guMrStockDaily);
    }

    /**
     * 新增股票日K线数据
     * 
     * @param guMrStockDaily 股票日K线数据
     * @return 结果
     */
    @Override
    public int insertGuMrStockDaily(GuMrStockDaily guMrStockDaily)
    {
        guMrStockDaily.setCreateTime(DateUtils.getNowDate());
        return guMrStockDailyMapper.insertGuMrStockDaily(guMrStockDaily);
    }

    /**
     * 修改股票日K线数据
     * 
     * @param guMrStockDaily 股票日K线数据
     * @return 结果
     */
    @Override
    public int updateGuMrStockDaily(GuMrStockDaily guMrStockDaily)
    {
        guMrStockDaily.setUpdateTime(DateUtils.getNowDate());
        return guMrStockDailyMapper.updateGuMrStockDaily(guMrStockDaily);
    }

    /**
     * 批量删除股票日K线数据
     * 
     * @param ids 需要删除的股票日K线数据主键
     * @return 结果
     */
    @Override
    public int deleteGuMrStockDailyByIds(String[] ids)
    {
        return guMrStockDailyMapper.deleteGuMrStockDailyByIds(ids);
    }

    /**
     * 删除股票日K线数据信息
     * 
     * @param id 股票日K线数据主键
     * @return 结果
     */
    @Override
    public int deleteGuMrStockDailyById(String id)
    {
        return guMrStockDailyMapper.deleteGuMrStockDailyById(id);
    }
}
